package com.wingsboat.system.service.impl;

import java.util.List;
import com.wingsboat.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.wingsboat.system.mapper.SysLineSleeperMapper;
import com.wingsboat.system.domain.SysLineSleeper;
import com.wingsboat.system.service.ISysLineSleeperService;

/**
 * 线路轨枕数据Service业务层处理
 * 
 * @author wangzhong
 * @date 2024-07-19
 */
@Service
public class SysLineSleeperServiceImpl implements ISysLineSleeperService 
{
    @Autowired
    private SysLineSleeperMapper sysLineSleeperMapper;

    /**
     * 查询线路轨枕数据
     * 
     * @param id 线路轨枕数据主键
     * @return 线路轨枕数据
     */
    @Override
    public SysLineSleeper selectSysLineSleeperById(Long id)
    {
        return sysLineSleeperMapper.selectSysLineSleeperById(id);
    }

    /**
     * 查询线路轨枕数据列表
     * 
     * @param sysLineSleeper 线路轨枕数据
     * @return 线路轨枕数据
     */
    @Override
    public List<SysLineSleeper> selectSysLineSleeperList(SysLineSleeper sysLineSleeper)
    {
        return sysLineSleeperMapper.selectSysLineSleeperList(sysLineSleeper);
    }

    /**
     * 新增线路轨枕数据
     * 
     * @param sysLineSleeper 线路轨枕数据
     * @return 结果
     */
    @Override
    public int insertSysLineSleeper(SysLineSleeper sysLineSleeper)
    {
        sysLineSleeper.setCreateTime(DateUtils.getNowDate());
        return sysLineSleeperMapper.insertSysLineSleeper(sysLineSleeper);
    }

    /**
     * 修改线路轨枕数据
     * 
     * @param sysLineSleeper 线路轨枕数据
     * @return 结果
     */
    @Override
    public int updateSysLineSleeper(SysLineSleeper sysLineSleeper)
    {
        sysLineSleeper.setUpdateTime(DateUtils.getNowDate());
        return sysLineSleeperMapper.updateSysLineSleeper(sysLineSleeper);
    }

    /**
     * 批量删除线路轨枕数据
     * 
     * @param ids 需要删除的线路轨枕数据主键
     * @return 结果
     */
    @Override
    public int deleteSysLineSleeperByIds(Long[] ids)
    {
        return sysLineSleeperMapper.deleteSysLineSleeperByIds(ids);
    }

    /**
     * 删除线路轨枕数据信息
     * 
     * @param id 线路轨枕数据主键
     * @return 结果
     */
    @Override
    public int deleteSysLineSleeperById(Long id)
    {
        return sysLineSleeperMapper.deleteSysLineSleeperById(id);
    }
}
